require 'socket'


socket = TCPSocket.open('localhost',ARGV[0])  # Connect to server
while line = socket.gets
    puts "received : #{line.chop}"
end
socket.puts(ARGV[1])
socket.close
